package com.huaxiafinance.management.mapper;

import com.huaxiafinance.management.dto.request.GiftDetailsDto;
import com.huaxiafinance.management.model.ScoreGiftCode;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ScoreGiftCodeMapper {
    int deleteByPrimaryKey(String giftCode);

    int insert(ScoreGiftCode record);

    int insertSelective(ScoreGiftCode record);

    ScoreGiftCode selectByPrimaryKey(String giftCode);

    int updateByPrimaryKeySelective(ScoreGiftCode record);

    int updateByPrimaryKey(ScoreGiftCode record);

    List<ScoreGiftCode> queryByScoreGiftId(GiftDetailsDto dto);

    int countCodes(@Param("scoreGiftId") Integer scoreGiftId);

    ScoreGiftCode selectByGiftCode(@Param("giftCode") String giftCode,@Param("nowDate") Date nowDate);

    List<ScoreGiftCode> selectByScoreGiftId(@Param("scoreGiftId") Integer scoreGiftId,
                                            @Param("nowDate") Date nowDate);
}